package com.cloud.basic.Advance.Design.Proxypattern;

/**
 * @program: basic
 * @description:
 * @author: Cloud
 * @create: 2022/2/25 15:48:43
 */
public class SgProxy implements Specialty {

    private WySpecialty wySpecialty = new WySpecialty();

    @Override
    public void display() {
        preRequest();
        wySpecialty.display();
        postRequest();
    }

    public void preRequest(){
        System.out.println("代理开始！");
    }

    public void postRequest(){
        System.out.println("代理结束！");
    }
}
